# -*- coding: binary -*-

#
# This class acts as standalone authenticator for Kerberos
#
class Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::LDAP < Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Base
  def build_spn(options = {})
    Rex::Proto::Kerberos::Model::PrincipalName.new(
      name_type: Rex::Proto::Kerberos::Model::NameType::NT_SRV_INST,
      name_string: [
        "ldap",
        options.fetch(:hostname) { hostname }
      ]
    )
  end
end
